<template>
    <el-card>
        <div class="box">
            <img :src="userStore.avatar" alt="头像" class="avatar">
            <div class="title">
                <h3>{{ getTime() }}好!{{ userStore.username }}</h3>
                <p>{{ info.title }}</p>
            </div>
        </div>
    </el-card>
    <div class="button">
        <svg-icon name="welcome" width="600px" height="300px"></svg-icon>
    </div>
</template>
<script setup lang='ts'>
// 引入用户相关的仓库,获取当前用户的头像和昵称
import useUserStore from '@/store/modules/user';
// 引入识别时间的方法
import getTime from '@/utils/time'
// 获取存储用户信息的仓库对象
let userStore = useUserStore();
// 引入项目信息
import info from '@/setting'
import { ref } from 'vue'

</script>
<style lang='scss' scoped>
.box {
    display: flex;

    .avatar {
        width: 100px;
        height: 100px;
        border-radius: 50%;
    }

    .title {
        margin-left: 20px;

        h3 {
            font-weight: 900;
            font-size: 30px;
            padding-bottom: 15px;
        }

        p {
            font-size: 20px;
            font-style: italic;
            color: rgb(111, 111, 111);
        }
    }
}

.button {
    margin-top: 80px;
    display: flex;
    justify-content: center;
}
</style>